local s11__hunzi = fk.CreateSkill {
  name = "s11__hunzi",
  tags = { Skill.Wake },
}

Fk:loadTranslationTable {
  ["s11__hunzi"] = "魂姿",
  [":s11__hunzi"] = "觉醒技，准备阶段，若你的体力值不大于2，你减1点体力上限，然后获得〖英姿〗和〖英魂〗。",

  ["$s11__hunzi1"] = "父亲在上，魂佑江东；公瑾在旁，智定天下！",
  ["$s11__hunzi2"] = "愿承父志，与公瑾共谋天下！",
}

s11__hunzi:addEffect(fk.EventPhaseStart, {
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(s11__hunzi.name) and
        player:usedSkillTimes(s11__hunzi.name, Player.HistoryGame) == 0 and
        player.phase == Player.Start
  end,
  can_wake = function(self, event, target, player, data)
    return player.hp < 3
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:changeMaxHp(player, -1)
    if player.dead then return end
    room:handleAddLoseSkills(player, "ex__yingzi|yinghun", nil, true, false)
  end,
})

return s11__hunzi
